//
//  SwizzingManager.m
//  Pods
//
//  Created by Mac on 2018/3/28.
//

#import "SwizzingManager.h"

@implementation SwizzingManager

+ (SwizzingManager *)sharedManager {
    static SwizzingManager *shared = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        shared = [[SwizzingManager alloc] init];
    });
    return shared;
}

+ (void)loadConfigDictFromPlist:(NSString *)plistName {
    
    NSString *finalFileType = @"plist";
    
    if ([plistName containsString:@"."]) {
        finalFileType = [plistName componentsSeparatedByString:@"."].lastObject;
    }
    
    NSString *path = [[NSBundle mainBundle] pathForResource:plistName ofType:finalFileType];
    NSDictionary *configDict = [NSDictionary dictionaryWithContentsOfFile:path];
    
    SwizzingManager *manager = [SwizzingManager sharedManager];
    manager.swizzingConfigDictinary = configDict;
    
}

@end
